
set(hisi_dir ${EXDIR}/hisi/hi3516ev200/)

include_directories(${hisi_dir}/common)
include_directories(${HEADER})
include_directories(../)

set(hisifil
${hisi_dir}/common/hisi_memmap.c
${hisi_dir}/common/hisi_reg_ctrl.c
${hisi_dir}/common/hi_message.c
${HEADER}/iogrps.cpp
hisicom.cpp
die_id.cpp
)


IF(ENABLE_SHARED_COM)
add_library(gpio SHARED ${hisifil})
else()
add_library(gpio STATIC ${hisifil})
endif()
target_link_libraries(gpio PUBLIC oraygpio-common)

set_target_properties(gpio PROPERTIES PUBLIC_HEADER "hisi-gpio.h")

INSTALL(FILES ${HEADER}/S15oraygpio  DESTINATION /etc/init.d
		PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
		GROUP_EXECUTE GROUP_READ GROUP_WRITE
		)

install (TARGETS gpio
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib
        PUBLIC_HEADER DESTINATION include/oraygpio
    )





